<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />

<css th:include="/common/css :: css('管理')"></css>
<link th:href="@{/css/manager/manager.css}" rel="stylesheet"
	type="text/css" />
</head>
<script id="product" type="text/html">
	{{#  layui.each(d, function(index, item){ }}
		<li class="layui-nav-item layui-nav-itemed">
			<a class="" href="javascript:;" data-index="{{item.value}}">
				<i class="layui-icon "></i>{{item.name}}
			</a>
			<dl class="layui-nav-child">
			{{#layui.each(item.children, function(i, elem){}}
				<dd data-index="{{elem.value}}">
					<a href="javascript:;" id="menu{{elem.value}}" htmlurl="{{elem.url}}">{{elem.name}}</a>
				</dd>
			{{#});}}
			</dl>
		</li>
	{{# });}}
</script>

<body class="layui-layout-body">
	<div class="layui-layout layui-layout-admin">
		<div class="layui-header">
			<div class="layui-logo">后台管理系统</div>
			<!-- 头部区域（可配合layui已有的水平导航） -->
			<ul class="layui-nav layui-layout-left" id="topmenu"
				lay-filter="topmenu">

			</ul>
			<ul class="layui-nav layui-layout-right">
				<li class="layui-nav-item"><a href="javascript:;"> <img
						src="" class="layui-nav-img"
						th:text="${session.userSession.username}" />
				</a>
					<dl class="layui-nav-child">
						<dd>
							<a href="">基本资料</a>
						</dd>
						<dd>
							<a href="">安全设置</a>
						</dd>
					</dl></li>
				<li class="layui-nav-item"><a th:href="@{/logout}">退出</a></li>
			</ul>
		</div>

		<div class="layui-side layui-bg-black">
			<div class="layui-side-scroll">
				<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
				<ul class="layui-nav layui-nav-tree" lay-filter="leftmenu"
					id="leftmenu">

				</ul>
			</div>
		</div>

		<div class="layui-body">
			<div class="layui-tab layui-tab-brief" lay-filter="manager"
				lay-allowClose="true" lay-contextmenu="true">
				<ul class="layui-tab-title" id="manager">
					<li class="layui-this lay-tab-unclose" lay-id="index">首页</li>
				</ul>
				<div class="layui-tab-content">
					<div class="layui-tab-item layui-show">Welcome!</div>
				</div>
			</div>
		</div>

		<div class="layui-footer">
			<!-- 底部固定区域 -->
			© layui.com - 底部固定区域
		</div>
	</div>

	<js th:include="/common/js :: js"></js>
	<script type="text/javascript" th:src="@{/js/manager/manager.js}"></script>
	<script type="text/javascript" th:src="@{/js/system/userManager.js}"></script>
	<script type="text/javascript" th:src="@{/js/system/roleManager.js}"></script>
	<script type="text/javascript" th:src="@{/js/worklog/addWroklog.js}"></script>
	<script th:inline="javascript">
		//config的设置是全局的
		layui.config({
			base : '/js/common/' // 假设这是你存放拓展模块的根目录
		}).extend({ // 设定模块别名
			select : 'select', // 如果 mymod.js 是在根目录，也可以不用设定别名
			tabMenu:'tabMenu',
			formSelects: 'formSelects-v4'
		});
		/*<![CDATA[*/
			var user = [[${session.userSession}]];
			user.createTime = format(new Date(user.createTime),"yyyy-MM-dd hh:mm:ss");
			user.updateTime = format(new Date(user.updateTime),"yyyy-MM-dd hh:mm:ss");
			user.lastTime = format(new Date(user.lastTime),"yyyy-MM-dd hh:mm:ss");
		/*]]>*/
		
		layui.use(['element','laytpl','layer','tabMenu'], function() {
			var element = layui.element;
			var laytpl = layui.laytpl;
			var layer = layui.layer;
			var tabMenu = layui.tabMenu;
			var manager = new Manager();
			manager.init(user,element,laytpl,layer,tabMenu);
		});
	</script>
</body>
</html>